﻿using System;
using System.Collections.Generic;
using Business.Common.DataDictionary;
using Business.DataAccess.Repository.Warehouse;
using Business.Domain.Warehouse;

namespace Business.Component
{
    public class PlaceManager
    {
        public static Area GetArea(int skuId)
        {
            throw new NotImplementedException();
        }

        public static List<Location> GetPickLocations(int warehouseId, int skuId)
        {
            var repository = new SkuLocationRepository();
            return repository.GetLocations(warehouseId, (int) AreaType.Picking, skuId);
        }

        public static List<Location> GetStorageLocations(int warehouseId, int skuId)
        {
            var repository = new SkuLocationRepository();
            return repository.GetLocations(warehouseId, (int) AreaType.Storage, skuId);
        }

        public static List<Location> GetSecondHandLocations(int warehouseId, int skuId)
        {
            var repository = new SkuLocationRepository();
            return repository.GetLocations(warehouseId, (int) AreaType.SecondHand, skuId);
        }

        public static List<Location> GetBadLocations(int warehouseId, int skuId)
        {
            var repository = new SkuLocationRepository();
            return repository.GetLocations(warehouseId, (int) AreaType.Bad, skuId);
        }
    }
}